<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>模拟vue响应式</title>
</head>
<body>
<div id="app">
    <h3>插值表达式</h3>
    <p>msg: {{msg}}</p>
    <p>count: {{count}}</p>
    <h3>v-text</h3>
    <div v-text="msg"></div>
    <h3>v-html</h3>
    <div v-html="html"></div>
    <h3>v-on</h3>
    <div v-on:click="clickTest">v-on指令测试, 请点击我</div>
    <h3>v-model</h3>
    <input type="text" v-model="msg">
    <input type="text" v-model="count">
</div>
<script src="js/dep.js"></script>
<script src="js/watch.js"></script>
<script src="js/compiler.js"></script>
<script src="js/observer.js"></script>
<script src="js/vue.js"></script>
<script>
    let vm = new Vue({
        el: '#app',
        data: {
            msg: '1131',
            count: 1312,
            person: {
                name: '蜂蜜'
            },
            html: '<b style="color: red">v-html指令测试</b>'
        },
        methods: {
            clickTest() {
                console.log(this);
                alert('click!!!!!!!!');
            }
        }
    });
    console.log(vm);
    vm.person.vv = 123;
</script>
</body>
</html>
